import { antdOptions } from '@heerey525/china-division-data'

// 转换数据格式（适配antd cascader）
const convertRegionData = (data: any[]) => {
  return data.map(province => ({
    value: province.value,
    label: province.label,
    children: province.children?.map(city => ({
      value: city.value,
      label: city.label,
      children: city.children?.map(area => ({
        value: area.value,
        label: area.label
      }))
    }))
  }))
}

// 导出完整的省市区三级数据
export default convertRegionData(antdOptions)